body {
  margin: 0;
  padding: 20px;
  background: #000;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  height: 100vh;
  overflow: hidden;
}

#terminal {
  height: calc(100vh - 80px);
  color: #f0f0f0;
  padding: 0;
  border-radius: 0;
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  background-color: #1e1e1e;
  position: relative;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.2);
}

#output {
  flex: 1;
  white-space: pre-wrap;
  overflow-y: auto;
  margin-bottom: 0;
  padding: 10px;
  line-height: 1.3;
  font-size: 14px;
}

#input-line {
  display: flex;
  align-items: center;
  padding: 0 10px;
  position: relative;
  background: #1e1e1e;
}

.prompt {
  color: #5fe98c;
  margin-right: 8px;
  user-select: none;
  text-shadow: 0 0 2px rgba(95, 233, 140, 0.2);
}

#command-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #f0f0f0;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  outline: none;
  padding: 5px 0;
  caret-color: #d4d4d4;
  caret-shape: block;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.2);
}

#command-input:focus::after {
  content: '█';
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.error {
  color: #ff6b6b;
}

.success {
  color: #87d441;
}

.info {
  color: #75baff;
}

.loader {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #75baff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  color: #75baff;
  display: inline-block;
  vertical-align: middle;
  font-style: italic;
}

.command-line {
  padding: 2px 0;
  display: block;
}

::selection {
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #444;
}

.keyboard-shortcuts {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #333;
  padding: 0;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  border-top: 1px solid #444;
  z-index: 100;
  transition: all 0.3s ease;
}

.keyboard-shortcuts.collapsed {
  max-height: 30px;
  overflow: hidden;
}

.keyboard-shortcuts.expanded {
  max-height: 120px;
  overflow-y: auto;
  padding: 8px;
}

.shortcuts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  background: #2a2a2a;
  cursor: pointer;
  user-select: none;
}

.shortcuts-header:hover {
  background: #3a3a3a;
}

.shortcuts-title {
  color: #75baff;
  font-weight: bold;
}

.shortcuts-toggle {
  color: #75baff;
  transition: transform 0.3s ease;
}

.shortcuts-content {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 8px;
}

.keyboard-shortcuts.collapsed .shortcuts-toggle {
  transform: rotate(180deg);
}

.editor {
  background: #1e1e1e;
  border: 1px solid #333;
  margin: 10px 0;
  height: 300px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.editor-content {
  flex: 1;
  padding: 5px;
}

#editor-textarea {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  color: #f0f0f0;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  resize: none;
  outline: none;
  padding-bottom: 40px;
}

.editor-footer {
  background: #333;
  padding: 5px;
  font-size: 12px;
}

.editor-buttons {
  position: absolute;
  bottom: 30px;
  right: 10px;
  display: flex;
  gap: 10px;
  padding: 5px;
  background: rgba(51, 51, 51, 0.9);
  border-radius: 4px;
}

.editor-button {
  background: #444;
  border: 1px solid #555;
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  transition: background 0.2s;
}

.editor-button:hover {
  background: #555;
}

.editor-button:active {
  background: #666;
}

.editor-button.save {
  background: #2a6f3b;
}

.editor-button.save:hover {
  background: #358a49;
}

.editor-button.exit {
  background: #8b3e3e;
}

.editor-button.exit:hover {
  background: #a64d4d;
}

.nano-shortcuts {
  color: #666;
}

.vim-mode {
  color: #5fe98c;
}

.vim-status {
  color: #75baff;
  min-height: 1.2em;
}

/* Menu Bar Styles */
.menu-bar {
  background: #333;
  padding: 5px 10px;
  border-bottom: 1px solid #444;
  display: flex;
  gap: 10px;
}

.menu-button {
  background: #444;
  border: 1px solid #555;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  display: flex;
  align-items: center;
  transition: background 0.2s;
}

.menu-button:hover {
  background: #555;
}

/* Browser Window Styles */
.browser-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background: #1e1e1e;
  border: 1px solid #444;
  border-radius: 6px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

.browser-toolbar {
  background: #333;
  padding: 8px;
  border-bottom: 1px solid #444;
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: move;
}

.browser-controls {
  display: flex;
  gap: 5px;
}

.browser-button {
  background: #444;
  border: 1px solid #555;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.browser-button:hover {
  background: #555;
}

.url-bar {
  flex: 1;
  background: #222;
  border: 1px solid #444;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: inherit;
}

.browser-close {
  background: #8b3e3e;
  border: none;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.browser-close:hover {
  background: #a64d4d;
}

.browser-content {
  flex: 1;
  background: #fff;
  overflow: auto;
}

.browser-placeholder {
  padding: 20px;
  background: #1e1e1e;
  color: #f0f0f0;
  height: 100%;
}

.browser-message {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
}

.browser-response {
  margin-top: 10px;
  padding: 10px;
  background: #2a2a2a;
  border-radius: 4px;
  white-space: pre-wrap;
}

@media (max-width: 600px) {
  body {
    padding: 0;
  }
  
  #terminal {
    height: calc(100vh - 60px);
  }
  
  #output {
    font-size: 13px;
  }
  
  #command-input {
    font-size: 13px;
  }
  
  .keyboard-shortcuts.expanded {
    max-height: 80px;
  }
  
  .shortcuts-header {
    padding: 3px 8px;
  }
  
  .shortcuts-content {
    padding: 4px;
  }
  
  .editor {
    height: 200px;
  }
  
  .nano-shortcuts {
    font-size: 10px;
  }
  
  .browser-window {
    width: 95%;
    height: 90%;
  }
  
  .browser-toolbar {
    padding: 4px;
  }
  
  .browser-button,
  .browser-close {
    width: 20px;
    height: 20px;
    font-size: 12px;
  }
  
  .url-bar {
    font-size: 12px;
  }
}